<?php

namespace admin {

    use C\lib\Session;

    class panel extends ctr {

        // --- 加载后台首页 ---

        public function main() {

            if($worker = $this->getLogAds()) {

                $this->render('panel/main');
            }else

                $this->render('admin/user');
        }

        public function logout() {
            Session::start();
            if(isset($_SESSION['worker.id'])) unset($_SESSION['worker.id']);
            $this->render('admin/user1');
        }

    }

}

